package com.sale.goods.service;

import com.sale.common.mybatis.core.page.PageQuery;
import com.sale.common.mybatis.core.page.TableDataInfo;
import com.sale.goods.domain.dto.GoodsPaymentDto;
import com.sale.goods.domain.vo.GoodsPaymentVo;
import com.sale.goods.api.dto.GoodsMessageBySupplierDto;

import java.util.List;
import java.util.Map;

/**
 * @Description
 * @Param
 * @Date
 * @Author hl
 **/
public interface IGoodsPaymentService {

    /**
     * 付款单
     *
     * @param goodsPaymentVo,pageQuery
     * @return 付款单集合
     */
    TableDataInfo<GoodsPaymentDto> selectPaymentList(GoodsPaymentVo goodsPaymentVo, PageQuery pageQuery);

    /**
     * 新增付款单
     *
     * @param goodsPaymentVo
     * @return int
     */
    int insertPayment(GoodsPaymentVo goodsPaymentVo) throws Exception;

    /**
     * 查询单个付款单
     *
     * @param paymentId
     * @return Object
     */
    Object selectPaymentById(long paymentId);

    /**
     * 删除单个付款单
     *
     * @param paymentId
     * @return int
     */
    int deletePaymentById(Long paymentId);

    /**
     * 修改付款单
     *
     * @param goodsPaymentVo
     * @return int
     */
    int updatePaymentEdit(GoodsPaymentVo goodsPaymentVo);

    /**
     * 提交审核
     *
     * @param paymentId
     * @return int
     */
    int submitReview(Long paymentId);

    /**
     * 撤销审核
     *
     * @param paymentId
     * @return int
     */
    int deleteReview(Long paymentId);

    /**
     * 审核单据
     *
     * @param goodsPaymentVo
     * @return int
     */
    int goodSExamineReview(GoodsPaymentVo goodsPaymentVo) throws Exception;

    /**
     * 工作台接口(销售已收款金额)
     */
    String goodsReceived();

    /**
     * 工作台接口(采购未付款金额)
     */
    String goodsArrears();

    /**
     * 根据供应商分组获取已核销金额、整单折扣
     */
    Map<String, GoodsMessageBySupplierDto> getGoodsMessageBySupplier();
}
